import '../shared/models/word.dart';

class EsperantoRootsAffixes {
  // 词根 (Word Roots) - 基础概念
  static final List<Word> roots = [
    // 动作词根
    Word(id: 'ir', esperanto: 'ir-', english: 'go', pronunciation: 'IR', definition: 'Root meaning to go or move', category: 'Roots', examples: ['iri (to go)', 'foriri (to leave)'], audioUrl: '', difficulty: 2),
    Word(id: 'ven', esperanto: 'ven-', english: 'come', pronunciation: 'VEN', definition: 'Root meaning to come', category: 'Roots', examples: ['veni (to come)', 'alveni (to arrive)'], audioUrl: '', difficulty: 2),
    Word(id: 'far', esperanto: 'far-', english: 'do/make', pronunciation: 'FAR', definition: 'Root meaning to do or make', category: 'Roots', examples: ['fari (to do)', 'farigi (to make)'], audioUrl: '', difficulty: 2),
    Word(id: 'don', esperanto: 'don-', english: 'give', pronunciation: 'DON', definition: 'Root meaning to give', category: 'Roots', examples: ['doni (to give)', 'redoni (to give back)'], audioUrl: '', difficulty: 2),
    Word(id: 'pren', esperanto: 'pren-', english: 'take', pronunciation: 'PREN', definition: 'Root meaning to take', category: 'Roots', examples: ['preni (to take)', 'elpreni (to take out)'], audioUrl: '', difficulty: 2),
    Word(id: 'vid', esperanto: 'vid-', english: 'see', pronunciation: 'VID', definition: 'Root meaning to see', category: 'Roots', examples: ['vidi (to see)', 'videbla (visible)'], audioUrl: '', difficulty: 2),
    Word(id: 'aŭd', esperanto: 'aŭd-', english: 'hear', pronunciation: 'AŬD', definition: 'Root meaning to hear', category: 'Roots', examples: ['aŭdi (to hear)', 'aŭdebla (audible)'], audioUrl: '', difficulty: 2),
    Word(id: 'dir', esperanto: 'dir-', english: 'say', pronunciation: 'DIR', definition: 'Root meaning to say', category: 'Roots', examples: ['diri (to say)', 'eldiri (to pronounce)'], audioUrl: '', difficulty: 2),
    Word(id: 'skrib', esperanto: 'skrib-', english: 'write', pronunciation: 'SKRIB', definition: 'Root meaning to write', category: 'Roots', examples: ['skribi (to write)', 'subskribi (to sign)'], audioUrl: '', difficulty: 2),
    Word(id: 'leg', esperanto: 'leg-', english: 'read', pronunciation: 'LEG', definition: 'Root meaning to read', category: 'Roots', examples: ['legi (to read)', 'prelegi (to lecture)'], audioUrl: '', difficulty: 2),
    Word(id: 'lern', esperanto: 'lern-', english: 'learn', pronunciation: 'LERN', definition: 'Root meaning to learn', category: 'Roots', examples: ['lerni (to learn)', 'lernejo (school)'], audioUrl: '', difficulty: 2),
    Word(id: 'labor', esperanto: 'labor-', english: 'work', pronunciation: 'la-BOR', definition: 'Root meaning to work', category: 'Roots', examples: ['labori (to work)', 'laborejo (workplace)'], audioUrl: '', difficulty: 2),
    Word(id: 'viv', esperanto: 'viv-', english: 'live', pronunciation: 'VIV', definition: 'Root meaning to live', category: 'Roots', examples: ['vivi (to live)', 'vivejo (dwelling)'], audioUrl: '', difficulty: 2),
    Word(id: 'mort', esperanto: 'mort-', english: 'die', pronunciation: 'MORT', definition: 'Root meaning to die', category: 'Roots', examples: ['morti (to die)', 'mortigi (to kill)'], audioUrl: '', difficulty: 2),
    Word(id: 'naŝk', esperanto: 'naŝk-', english: 'be born', pronunciation: 'NAŜK', definition: 'Root meaning to be born', category: 'Roots', examples: ['naskiĝi (to be born)', 'naskigi (to give birth)'], audioUrl: '', difficulty: 3),
    
    // 感觉词根
    Word(id: 'am', esperanto: 'am-', english: 'love', pronunciation: 'AM', definition: 'Root meaning to love', category: 'Roots', examples: ['ami (to love)', 'amiko (friend)'], audioUrl: '', difficulty: 2),
    Word(id: 'mal-am', esperanto: 'mal-am-', english: 'hate', pronunciation: 'mal-AM', definition: 'Root meaning to hate', category: 'Roots', examples: ['malami (to hate)', 'malamiko (enemy)'], audioUrl: '', difficulty: 2),
    Word(id: 'tim', esperanto: 'tim-', english: 'fear', pronunciation: 'TIM', definition: 'Root meaning to fear', category: 'Roots', examples: ['timi (to fear)', 'timema (fearful)'], audioUrl: '', difficulty: 2),
    Word(id: 'ĝoj', esperanto: 'ĝoj-', english: 'joy', pronunciation: 'ĜOJ', definition: 'Root meaning joy', category: 'Roots', examples: ['ĝoji (to rejoice)', 'ĝojiga (joyful)'], audioUrl: '', difficulty: 2),
    Word(id: 'dolor', esperanto: 'dolor-', english: 'pain', pronunciation: 'do-LOR', definition: 'Root meaning pain', category: 'Roots', examples: ['dolori (to hurt)', 'dolora (painful)'], audioUrl: '', difficulty: 2),
    
    // 思维词根
    Word(id: 'pens', esperanto: 'pens-', english: 'think', pronunciation: 'PENS', definition: 'Root meaning to think', category: 'Roots', examples: ['pensi (to think)', 'pensema (thoughtful)'], audioUrl: '', difficulty: 2),
    Word(id: 'sci', esperanto: 'sci-', english: 'know', pronunciation: 'SCI', definition: 'Root meaning to know', category: 'Roots', examples: ['scii (to know)', 'scienco (science)'], audioUrl: '', difficulty: 2),
    Word(id: 'memor', esperanto: 'memor-', english: 'remember', pronunciation: 'me-MOR', definition: 'Root meaning to remember', category: 'Roots', examples: ['memori (to remember)', 'memorigi (to remind)'], audioUrl: '', difficulty: 2),
    Word(id: 'kompren', esperanto: 'kompren-', english: 'understand', pronunciation: 'kom-PREN', definition: 'Root meaning to understand', category: 'Roots', examples: ['kompreni (to understand)', 'komprenebla (understandable)'], audioUrl: '', difficulty: 2),
    Word(id: 'kred', esperanto: 'kred-', english: 'believe', pronunciation: 'KRED', definition: 'Root meaning to believe', category: 'Roots', examples: ['kredi (to believe)', 'kredinda (believable)'], audioUrl: '', difficulty: 2),
  ];

  // 前缀 (Prefixes)
  static final List<Word> prefixes = [
    Word(id: 'mal-', esperanto: 'mal-', english: 'opposite', pronunciation: 'MAL', definition: 'Prefix meaning opposite', category: 'Prefixes', examples: ['bona → malbona (good → bad)', 'granda → malgranda (big → small)'], audioUrl: '', difficulty: 2),
    Word(id: 're-', esperanto: 're-', english: 'again/back', pronunciation: 'RE', definition: 'Prefix meaning again or back', category: 'Prefixes', examples: ['veni → reveni (come → come back)', 'fari → refari (do → redo)'], audioUrl: '', difficulty: 2),
    Word(id: 'dis-', esperanto: 'dis-', english: 'apart/scatter', pronunciation: 'DIS', definition: 'Prefix meaning apart or scatter', category: 'Prefixes', examples: ['iri → disiri (go → scatter)', 'doni → disdoni (give → distribute)'], audioUrl: '', difficulty: 3),
    Word(id: 'ek-', esperanto: 'ek-', english: 'start/sudden', pronunciation: 'EK', definition: 'Prefix meaning start or sudden action', category: 'Prefixes', examples: ['krii → ekkrii (cry → cry out)', 'vidi → ekvidi (see → catch sight)'], audioUrl: '', difficulty: 3),
    Word(id: 'el-', esperanto: 'el-', english: 'out of', pronunciation: 'EL', definition: 'Prefix meaning out of', category: 'Prefixes', examples: ['iri → eliri (go → go out)', 'preni → elpreni (take → take out)'], audioUrl: '', difficulty: 2),
    Word(id: 'en-', esperanto: 'en-', english: 'into', pronunciation: 'EN', definition: 'Prefix meaning into', category: 'Prefixes', examples: ['iri → eniri (go → go into)', 'meti → enmeti (put → put into)'], audioUrl: '', difficulty: 2),
    Word(id: 'for-', esperanto: 'for-', english: 'away', pronunciation: 'FOR', definition: 'Prefix meaning away', category: 'Prefixes', examples: ['iri → foriri (go → go away)', 'doni → fordoni (give → give away)'], audioUrl: '', difficulty: 2),
    Word(id: 'pra-', esperanto: 'pra-', english: 'original/ancient', pronunciation: 'PRA', definition: 'Prefix meaning original or ancient', category: 'Prefixes', examples: ['avo → praavo (grandfather → great-grandfather)', 'tempo → pratempo (time → ancient time)'], audioUrl: '', difficulty: 3),
    Word(id: 'super-', esperanto: 'super-', english: 'above/over', pronunciation: 'su-PER', definition: 'Prefix meaning above or over', category: 'Prefixes', examples: ['natura → supernatura (natural → supernatural)', 'homo → superhomo (man → superman)'], audioUrl: '', difficulty: 3),
    Word(id: 'sub-', esperanto: 'sub-', english: 'under/below', pronunciation: 'SUB', definition: 'Prefix meaning under or below', category: 'Prefixes', examples: ['tero → subtero (earth → underground)', 'skribi → subskribi (write → sign)'], audioUrl: '', difficulty: 3),
    Word(id: 'inter-', esperanto: 'inter-', english: 'between/among', pronunciation: 'in-TER', definition: 'Prefix meaning between or among', category: 'Prefixes', examples: ['nacia → internacia (national → international)', 'paroli → interparoli (speak → converse)'], audioUrl: '', difficulty: 3),
    Word(id: 'trans-', esperanto: 'trans-', english: 'across/through', pronunciation: 'TRANS', definition: 'Prefix meaning across or through', category: 'Prefixes', examples: ['iri → transiri (go → cross)', 'doni → transdoni (give → hand over)'], audioUrl: '', difficulty: 3),
    Word(id: 'kun-', esperanto: 'kun-', english: 'together/with', pronunciation: 'KUN', definition: 'Prefix meaning together or with', category: 'Prefixes', examples: ['labori → kunlabori (work → collaborate)', 'veni → kunveni (come → assemble)'], audioUrl: '', difficulty: 2),
    Word(id: 'sen-', esperanto: 'sen-', english: 'without', pronunciation: 'SEN', definition: 'Prefix meaning without', category: 'Prefixes', examples: ['espero → senespero (hope → despair)', 'mono → senmona (money → penniless)'], audioUrl: '', difficulty: 2),
    Word(id: 'mis-', esperanto: 'mis-', english: 'wrongly/badly', pronunciation: 'MIS', definition: 'Prefix meaning wrongly or badly', category: 'Prefixes', examples: ['kompreni → miskompreni (understand → misunderstand)', 'uzi → misuzi (use → misuse)'], audioUrl: '', difficulty: 3),
  ];

  // 后缀 (Suffixes)
  static final List<Word> suffixes = [
    Word(id: '-i', esperanto: '-i', english: 'infinitive', pronunciation: 'I', definition: 'Suffix for infinitive verbs', category: 'Suffixes', examples: ['labor- → labori (work)', 'am- → ami (love)'], audioUrl: '', difficulty: 1),
    Word(id: '-as', esperanto: '-as', english: 'present tense', pronunciation: 'AS', definition: 'Suffix for present tense', category: 'Suffixes', examples: ['mi laboras (I work)', 'li amas (he loves)'], audioUrl: '', difficulty: 1),
    Word(id: '-is', esperanto: '-is', english: 'past tense', pronunciation: 'IS', definition: 'Suffix for past tense', category: 'Suffixes', examples: ['mi laboris (I worked)', 'li amis (he loved)'], audioUrl: '', difficulty: 1),
    Word(id: '-os', esperanto: '-os', english: 'future tense', pronunciation: 'OS', definition: 'Suffix for future tense', category: 'Suffixes', examples: ['mi laboros (I will work)', 'li amos (he will love)'], audioUrl: '', difficulty: 1),
    Word(id: '-o', esperanto: '-o', english: 'noun', pronunciation: 'O', definition: 'Suffix for nouns', category: 'Suffixes', examples: ['labor- → laboro (work)', 'am- → amo (love)'], audioUrl: '', difficulty: 1),
    Word(id: '-a', esperanto: '-a', english: 'adjective', pronunciation: 'A', definition: 'Suffix for adjectives', category: 'Suffixes', examples: ['bon- → bona (good)', 'bel- → bela (beautiful)'], audioUrl: '', difficulty: 1),
    Word(id: '-e', esperanto: '-e', english: 'adverb', pronunciation: 'E', definition: 'Suffix for adverbs', category: 'Suffixes', examples: ['bon- → bone (well)', 'rapid- → rapide (quickly)'], audioUrl: '', difficulty: 1),
    Word(id: '-j', esperanto: '-j', english: 'plural', pronunciation: 'J', definition: 'Suffix for plural', category: 'Suffixes', examples: ['libro → libroj (books)', 'domo → domoj (houses)'], audioUrl: '', difficulty: 1),
    Word(id: '-n', esperanto: '-n', english: 'accusative', pronunciation: 'N', definition: 'Suffix for accusative case', category: 'Suffixes', examples: ['mi vidas libron (I see a book)', 'li amas ŝin (he loves her)'], audioUrl: '', difficulty: 1),
    Word(id: '-in', esperanto: '-in-', english: 'female', pronunciation: 'IN', definition: 'Suffix for female', category: 'Suffixes', examples: ['patro → patrino (father → mother)', 'koko → kokino (rooster → hen)'], audioUrl: '', difficulty: 2),
    Word(id: '-id', esperanto: '-id-', english: 'offspring', pronunciation: 'ID', definition: 'Suffix for offspring', category: 'Suffixes', examples: ['kato → katido (cat → kitten)', 'hundo → hundido (dog → puppy)'], audioUrl: '', difficulty: 2),
    Word(id: '-ej', esperanto: '-ej-', english: 'place', pronunciation: 'EJ', definition: 'Suffix for place', category: 'Suffixes', examples: ['lerni → lernejo (learn → school)', 'labori → laborejo (work → workplace)'], audioUrl: '', difficulty: 2),
    Word(id: '-il', esperanto: '-il-', english: 'tool/instrument', pronunciation: 'IL', definition: 'Suffix for tool or instrument', category: 'Suffixes', examples: ['tranĉi → tranĉilo (cut → knife)', 'kombi → kombilo (comb → comb)'], audioUrl: '', difficulty: 2),
    Word(id: '-ist', esperanto: '-ist-', english: 'profession/person', pronunciation: 'IST', definition: 'Suffix for profession or person who does', category: 'Suffixes', examples: ['muziko → muzikisto (music → musician)', 'art- → artisto (art → artist)'], audioUrl: '', difficulty: 2),
    Word(id: '-an', esperanto: '-an-', english: 'member/inhabitant', pronunciation: 'AN', definition: 'Suffix for member or inhabitant', category: 'Suffixes', examples: ['Ameriko → amerikano (America → American)', 'urbo → urbano (city → citizen)'], audioUrl: '', difficulty: 2),
    Word(id: '-ar', esperanto: '-ar-', english: 'collection/group', pronunciation: 'AR', definition: 'Suffix for collection or group', category: 'Suffixes', examples: ['homo → homaro (human → humanity)', 'vorto → vortaro (word → dictionary)'], audioUrl: '', difficulty: 2),
    Word(id: '-aĵ', esperanto: '-aĵ-', english: 'thing/object', pronunciation: 'AĴ', definition: 'Suffix for thing or object', category: 'Suffixes', examples: ['manĝi → manĝaĵo (eat → food)', 'trinki → trinkaĵo (drink → beverage)'], audioUrl: '', difficulty: 2),
    Word(id: '-ebl', esperanto: '-ebl-', english: 'possible', pronunciation: 'EBL', definition: 'Suffix meaning possible', category: 'Suffixes', examples: ['vidi → videbla (see → visible)', 'kredi → kredebla (believe → believable)'], audioUrl: '', difficulty: 2),
    Word(id: '-ig', esperanto: '-ig-', english: 'cause/make', pronunciation: 'IG', definition: 'Suffix meaning to cause or make', category: 'Suffixes', examples: ['pura → purigi (pure → to purify)', 'varma → varmigi (warm → to warm)'], audioUrl: '', difficulty: 2),
    Word(id: '-iĝ', esperanto: '-iĝ-', english: 'become', pronunciation: 'IĜ', definition: 'Suffix meaning to become', category: 'Suffixes', examples: ['pura → puriĝi (pure → to become pure)', 'varma → varmiĝi (warm → to become warm)'], audioUrl: '', difficulty: 2),
  ];

  // 获取所有词根词缀
  static List<Word> get allRootsAffixes => [
    ...roots,
    ...prefixes,
    ...suffixes,
  ];

  // 根据类别获取词汇
  static List<Word> getWordsByCategory(String category) {
    switch (category) {
      case 'Roots':
        return roots;
      case 'Prefixes':
        return prefixes;
      case 'Suffixes':
        return suffixes;
      default:
        return allRootsAffixes;
    }
  }

  // 获取所有类别
  static List<String> getAllCategories() {
    return ['Roots', 'Prefixes', 'Suffixes'];
  }
} 